<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright 2010 Västra Götalandsregionen

      This library is free software; you can redistribute it and/or modify
      it under the terms of version 2.1 of the GNU Lesser General Public
      License as published by the Free Software Foundation.

      This library is distributed in the hope that it will be useful,
      but WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      GNU Lesser General Public License for more details.

      You should have received a copy of the GNU Lesser General Public
      License along with this library; if not, write to the
      Free Software Foundation, Inc., 59 Temple Place, Suite 330,
      Boston, MA 02111-1307  USA


-->

<html xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:ui="http://java.sun.com/jsf/facelets"
	  xmlns:h="http://java.sun.com/jsf/html"
	  xmlns:f="http://java.sun.com/jsf/core"
	  xmlns:c="http://java.sun.com/jstl/core">
<head>
	<title></title>
</head>
<body>
	<ui:composition template="/template.xhtml">
		<ui:define name="body">
			<div id="custom-doc">
			
   
      <div>
      	<a href="Webbisar.view-flow.flow"> <img src="images/vglogga_2.gif" /> </a>
      </div>
	  <div class="wrapper">
				<div id="hd">
				
				
					<div class="yui-b header"><h2>Webbisar</h2></div>

					<div class="yui-u searchfield">
             			 		<form name="webbisSearchForm" id="webbisSearchForm" jsfc="h:form">
                 				<input type="text" name="searchEngineQueryParameters" id="searchEngineQueryParameters" jsfc="h:inputHidden" value="#{SearchCriteria.searchEngineQueryParameters}"/>
 								<input type="text" name="searchCriteria" id="searchCriteria" jsfc="h:inputText"	value="#{SearchCriteria.text}" />
 								<input class="btn" type="submit" forceId="true" id="searchButtonId" action="searchForWebbisAction" immidiate="false" value="&#160;Sök&#160;" jsfc="h:commandButton"/>
								</form>
					</div>
			<br/>		
            <div class="yui-b topinfo">
              <p>
                Här kan du som förälder lägga in information om din nyfödda bebis. Du kan även lägga till bilder och film. För att skapa ett konto behöver du ha en &#160;<h:outputLink value="#{msgBundle['webbisar.eLegUrl']}" target="_blank">e-legitimation</h:outputLink>.
              <br/>Tjänsten ägs och drivs av Västra Götalandsregionen men du som lägger in informationen ansvarar själv för innehållet.                 
              </p>
            </div>
					<div>
						<div class="yui-ge header">
							<div class="yui-u first">	
                <p>	
                  <a href="Webbisar.view-flow.flow">Till startsidan</a><br/>
                  <c:choose>
                    <c:when test="#{not empty SearchCriteria.searchEngineQueryParameters}">
                      <a href="${flowExecutionUrl}&amp;_eventId=searchForWebbisAction&amp;javax.faces.ViewState=${flowExecutionContext.key}">Tillbaka</a>
                    </c:when>
                    <c:otherwise>
                      <a href="${flowExecutionUrl}&amp;_eventId=backToWebbisarAction&amp;javax.faces.ViewState=${flowExecutionContext.key}">Tillbaka</a>
                    </c:otherwise>
                  </c:choose>
                </p>
							</div>
							
    						<div class="yui-u">
                  <p class="rightHand">
                    <h:outputLink value="#{msgBundle['webbisar.remoteEditUrl']}" target="_blank">
                      Lägg till / Redigera webbis
                    </h:outputLink>
    						  </p>
                </div>
						</div>
					</div>	
          <!-- 
          <div class="yui-b searchinfo">Exempel: 20091011 +Erik -Johan Svensson Östra</div>
           -->
				</div>
				<div id="bd">
					<div id="yui-main">
						<div class="yui-b webbis">
			 				<h3 class="webbis">#{Webbis.header}</h3>
							<div class="yui-gc">
								<div class="yui-u first" style="*width: 60%">
                  <c:choose>
                    <c:when test="${Webbis.selectedMediaType != 'VIDEO'}">
                      <c:choose>
                        <c:when test="#{not empty Webbis.selectedMediaFileUrl}">
                          <img class="full" src="#{Webbis.selectedMediaFileUrl}"></img>
                        </c:when>
                        <c:otherwise>
                          <img class="full" alt="ingen bild" src="images/no-image.jpg" />
                        </c:otherwise>
                      </c:choose>
                    </c:when>
                    <c:otherwise>
                      <object classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" id="player" class="full">
                        <param name="url" value="#{Webbis.selectedMediaFileUrl}" />
                        <param name="src" value="#{Webbis.selectedMediaFileUrl}" />
                        <param name="showcontrols" value="true" />
                        <param name="autostart" value="false" />
                        <embed width="425px" height="320px" name="player" 
                          showcontrols="1" autoplay="0" controller="1" scale="tofit"
                          src="#{Webbis.selectedMediaFileUrl}" 
                          type="#{Webbis.selectedContentType}" />
                      </object> 
                    </c:otherwise>
                  </c:choose>
                </div>
								<div class="yui-u baby-info" style="*width: 29%;">
									<p><b>Född:</b> #{Webbis.longDate}</p>
                  <c:if test="#{Webbis.weight != '0g'}">
                    <p><b>Vikt:</b> #{Webbis.weight}</p>
                  </c:if>
                  <c:if test="#{Webbis.length != '0cm'}">
 									  <p><b>Längd:</b> #{Webbis.length}</p>
                  </c:if>
									<br/>
                  <c:if test="#{not empty Webbis.parent1 or not empty Webbis.parent2}">
                    <p>
                      <b>Föräldrar:</b><br/>
                      #{Webbis.parent1}<br/>
                      #{Webbis.parent2}<br/>
                    </p>
                  </c:if>
                  <br/>
                  <p>
                  <c:if test="#{not empty Webbis.siblings or not empty Webbis.multipleBirthSiblingIdsAndNames}">
                    <b>Syskon:</b>
                    <br/>
                    <c:forEach var="siblingInfo" items="#{Webbis.multipleBirthSiblingIdsAndNames}" begin="0" varStatus="refRow">
                      <c:if test="#{refRow.index > 0}">,</c:if>
                      <h:outputLink value="#{msgBundle['webbisar.baseUrl']}?webbisId=#{siblingInfo.key}">
                        #{siblingInfo.value}
                      </h:outputLink>
                    </c:forEach>
                    <c:if test="#{not empty Webbis.siblings}">
                      <c:if test="#{not empty Webbis.multipleBirthSiblingIdsAndNames}">,</c:if>
                      #{Webbis.siblings}
                    </c:if>
                  </c:if>
                  </p>
									<br/>
                  <c:if test="#{not empty Webbis.home}">
									<p><b>Från:</b> #{Webbis.home}</p>
                  </c:if>
									<p><b>Sjukhus:</b> #{Webbis.hospital}</p>
									<br/>
									<p>#{Webbis.message}</p>
									<br/>
                  <c:if test="#{not empty Webbis.homePage}">
									<p><b><a href="#{Webbis.homePage}" target="new">Länk till egen webbsida</a></b></p>
                  </c:if>
                  <br/>
                  <p><a href="${flowExecutionUrl}&amp;_eventId=showSendWebbisAction&amp;webbisId=#{Webbis.id}&amp;javax.faces.ViewState=${flowExecutionContext.key}">Skicka webbis till vän</a></p>
                  <c:if test="#{not empty MailMessageResult.message}">
                    <p>#{MailMessageResult.message}</p>
                  </c:if>  
                </div>
							</div>
							<div class="yui-gb webbisSelectedImageComment">
                <div class="yui-u first" style="width:42%">
                  <p>
                    <c:choose>
                      <c:when test="#{not empty Webbis.selectedImageComment}">
                        #{Webbis.selectedImageComment}
                      </c:when>
                      <c:otherwise>
                        &#160;
                      </c:otherwise>  
                    </c:choose>
                  </p>
                </div>
								<div class="yui-u" style="width:22%">
                  <p class="rightHand">
                    <a href="#{Webbis.selectedMediaFileUrl}" target="new">
                      <c:choose>
                        <c:when test="${Webbis.selectedMediaType != 'VIDEO'}">
                          <c:if test="#{not empty Webbis.selectedMediaFileUrl}">
                            Visa större bild
                          </c:if>  
                        </c:when>
                        <c:otherwise>
                          Visa/hämta film
                        </c:otherwise>
                      </c:choose>
                    </a>
                  </p>
                </div>
								<div class="yui-u"></div>
							</div>
							<div class="yui-g piclist">
								<div class="yui-g first">
									<div class="yui-u first">
                    <c:if test="#{Webbis.mediaFiles[0] != null}">
                      <a href="${flowExecutionUrl}&amp;_eventId=selectWebbisImageAction&amp;selectedImage=0&amp;javax.faces.ViewState=${flowExecutionContext.key}">
                        <c:choose>
                          <c:when test="${Webbis.mediaFiles[0].mediaType != 'VIDEO'}">
                            <c:choose>
                              <c:when test="#{not empty Webbis.mediaFiles[0].location}">
                                <img class="#{Webbis.style[0]}" src="#{Webbis.mediaFiles[0].location}"/>
                              </c:when>
                              <c:otherwise>
                                <img class="#{Webbis.style[0]}" src="images/no-image.jpg"/>
                              </c:otherwise>
                            </c:choose>
                          </c:when>
                          <c:otherwise>
                            <img class="#{Webbis.style[0]} video" src="images/video-thumb.png"/>
                          </c:otherwise>
                        </c:choose>
                      </a>
                    </c:if>
                  </div>
									<div class="yui-u">
                    <c:if test="#{Webbis.mediaFiles[1] != null}">
                      <a href="${flowExecutionUrl}&amp;_eventId=selectWebbisImageAction&amp;selectedImage=1&amp;javax.faces.ViewState=${flowExecutionContext.key}">
			  							  <c:choose>
                          <c:when test="${Webbis.mediaFiles[1].mediaType != 'VIDEO'}">
                            <c:choose>
                              <c:when test="#{not empty Webbis.mediaFiles[1].location}">
                                <img class="#{Webbis.style[1]}" src="#{Webbis.mediaFiles[1].location}"/>
                              </c:when>
                              <c:otherwise>
                                <img class="#{Webbis.style[1]}" src="images/no-image.jpg"/>
                              </c:otherwise>
                            </c:choose>
                          </c:when>
                          <c:otherwise>
                            <img class="#{Webbis.style[1]} video" src="images/video-thumb.png"/>
                          </c:otherwise>
                        </c:choose>
                      </a>
                    </c:if>
                  </div>
								</div>
								<div class="yui-g">
									<div class="yui-u first">
                    <c:if test="#{Webbis.mediaFiles[2] != null}">
                      <a href="${flowExecutionUrl}&amp;_eventId=selectWebbisImageAction&amp;selectedImage=2&amp;javax.faces.ViewState=${flowExecutionContext.key}">
  			  							<c:choose>
                          <c:when test="${Webbis.mediaFiles[2].mediaType != 'VIDEO'}">
                            <c:choose>
                              <c:when test="#{not empty Webbis.mediaFiles[2].location}">
                                <img class="#{Webbis.style[2]}" src="#{Webbis.mediaFiles[2].location}"/>
                              </c:when>
                              <c:otherwise>
                                <img class="#{Webbis.style[2]}" src="images/no-image.jpg"/>
                              </c:otherwise>
                            </c:choose>
                          </c:when>
                          <c:otherwise>
                            <img class="#{Webbis.style[2]} video" src="images/video-thumb.png"/>
                          </c:otherwise>
                        </c:choose>
                      </a>
                    </c:if>
                  </div>
									<div class="yui-u">
                    <c:if test="#{Webbis.mediaFiles[3] != null}">
                      <a href="${flowExecutionUrl}&amp;_eventId=selectWebbisImageAction&amp;selectedImage=3&amp;javax.faces.ViewState=${flowExecutionContext.key}">
			  							  <c:choose>
                          <c:when test="${Webbis.mediaFiles[3].mediaType != 'VIDEO'}">
                            <c:choose>
                              <c:when test="#{not empty Webbis.mediaFiles[3].location}">
                                <img class="#{Webbis.style[3]}" src="#{Webbis.mediaFiles[3].location}"/>
                              </c:when>
                              <c:otherwise>
                                <img class="#{Webbis.style[3]}" src="images/no-image.jpg"/>
                              </c:otherwise>
                            </c:choose>
                          </c:when>
                          <c:otherwise>
                            <img class="#{Webbis.style[3]} video" src="images/video-thumb.png"/>
                          </c:otherwise>
                        </c:choose>
                      </a>
                    </c:if>
                  </div>
								</div>
							</div>
							
							<div class="share-this" align="center">
								<div class="yui-g">
									<div class="first quarter-space">X</div>
								    <div class="first" style="width:10%;">
								    	<h2>Dela:</h2>
								    </div>
								    <span class="core">
										<!-- AddThis Button BEGIN -->
										<div class="addthis_toolbox addthis_default_style addthis_32x32_style">
										<a class="addthis_button_preferred_1"></a>
										<a class="addthis_button_preferred_2"></a>
										<a class="addthis_button_preferred_3"></a>
										<a class="addthis_button_preferred_4"></a>
										<a class="addthis_button_compact"></a>
										<a class="addthis_counter addthis_bubble_style"></a>
										</div>
										<script type="text/javascript">var addthis_config = {"data_track_clickback":true};</script>
										<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=vardportalen"></script>
										<!-- AddThis Button END -->
									</span>
									<div class="first quarter-space">X</div>
								</div>
						   </div>	
							
						</div>
					</div>
				</div>
				<div id="ft"></div>	
				</div>
			</div>
		</ui:define>
	</ui:composition>
</body>
</html>